package com.qzsoft.zhjd.asphalt.modules.statisticsmaterial.controller;

import java.util.Map;

import com.qzsoft.zhjd.asphalt.modules.statisticsmaterial.dto.AsphaltStatisticsMaterialDto;
import com.qzsoft.zhjd.asphalt.modules.statisticsmaterial.service.AsphaltStatisticsMaterialService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.jeemis.common.utils.Result;
import com.qzsoft.zhjd.common.utils.ResultUtils;

/**
 * @ClassName StatisticsMaterialController
 * @Description 材料用量分析
 * @author linhuawei
 * @since 2021-12-07
 */
@RestController
@RequestMapping("/api/asphaltStatisticsMaterial")
public class AsphaltStatisticsMaterialController {

    @Autowired
    private AsphaltStatisticsMaterialService asphaltStatisticsMaterialService;

    /**
     * @Title page
     * @Description 获取物料用料统计分页列表
     * @param params 查询条件
     * @return 物料用料统计分页列表
     */
    @RequiresPermissions("api:asphaltStatisticsMaterial:page")
    @GetMapping("/page")
    public Result<IPage<AsphaltStatisticsMaterialDto>> page(@RequestParam Map<String, Object> params) {
        IPage<AsphaltStatisticsMaterialDto> page = asphaltStatisticsMaterialService.pageDto(params);
        return ResultUtils.ok(page);
    }

}
